#ifndef CAMERA_H_
#define CAMERA_H_

#include <btBulletDynamicsCommon.h>
#include "world/Object.h"

class Camera {
protected:
	btVector3 up;

	float fieldOfView;
	float aspect;
	float viewNear;
	float viewFar;

	Object *parent;
	Object *target;

public:
	Camera(Object *parent);
	void view();
	void view(const btTransform& transform);
	void clearTarget();
	virtual ~Camera();

	float getAspect() const {
		return aspect;
	}

	float getFieldOfView() const {
		return fieldOfView;
	}

	Object *getParent() const {
		return parent;
	}

	Object *getTarget() const {
		return target;
	}

	btVector3 getUp() const {
		return up;
	}

	float getViewFar() const {
		return viewFar;
	}

	float getViewNear() const {
		return viewNear;
	}

	void setAspect(float aspect) {
		this->aspect = aspect;
	}

	void setFieldOfView(float fieldOfView) {
		this->fieldOfView = fieldOfView;
	}

	void setParent(Object *parent) {
		this->parent = parent;
	}

	void setTarget(Object *target) {
		this->target = target;
	}

	void setUp(const btVector3 &up) {
		this->up = up;
	}

	void setViewFar(float viewFar) {
		this->viewFar = viewFar;
	}

	void setViewNear(float viewNear) {
		this->viewNear = viewNear;
	}

};

#endif /* CAMERA_H_ */
